﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
		String path = request.getContextPath();
		String basePath = request.getScheme() + "://" + request.getServerName()
				+ ":" + request.getServerPort() + path + "/";
%>
<%@ taglib prefix="ww" uri="webwork" %>
<%@ taglib prefix="bk" uri="bank" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>main</title>
<LINK href="./css/style.css" type=text/css rel=stylesheet>
<script src="./js/date.js" type="text/javascript"></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #5CB7FE;
}
.STYLE1 {font-size: 12px}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
.STYLE5 {font-size: 12px; color: #FF0000; }
.STYLE6 {
	font-size: 16px;
	font-weight: bold;
}
-->
 </style>
</head>
<script language="javascript">
	function setall(){
			var ss=document.form1.item("select");
			for(var i=0;i<ss.length;i++){
					document.form1.item("select",i).checked=true;
				}
		}
	function setnull(){
			var ss=document.form1.item("select");
			for(var i=0;i<ss.length;i++){
					document.form1.item("select",i).checked=false;
				}
		}
	function go(){
		var count=0;
		for(var i=0; i<document.form1.select.length; i++){
			if(document.form1.select[i].checked){
				count++;
			}
		}
		if(count == 0){
				alert("请至少选择一项");
				return false;
			}
			else{
				return true;
			}	
		}
	function go1(){
		if(go()){
			if(checkstatus(form1.status,1))
			{		
				if(confirm("你确定要冻结帐户吗?")){				
					form1.action = "financeDepositCongeal.action";
					form1.submit();
				}
			}
		}
	}
	function go2(){
		if(go()){
			if(checkstatus(form1.status,2))
			{
				if(confirm("你确定要解冻帐户吗?")){
					form1.action = "financeDepositThaw.action";
					form1.submit();
				}
			}	
		}
	}
	function go3(){
		if(go()){
			if(checkstatus(form1.status,1))
			{
				if(confirm("你确定要注销帐户吗?")){
					form1.action = "financeDepositLogout.action";
					form1.submit();
				}
			}	
		}	
	}
	function check(){	
		if(form1.date.value != "" && form1.date.value.length < 10){
			alert('请选择正确的日期格式,如：（2006-02-01）');
			return false;
		}
	 return true;
	}
	function checkstatus(obj1,obj2)
	{		
		for(j=0; j<obj1.length; j++)
			{				
				if(obj1[j].checked){
					//alert(obj1[j].value);				
					if(obj1[j].value != obj2)
					{						
						if(obj2 == 1)
						{
							alert('你选择的帐号有已冻结或已注销的，不能操作，只能冻结正常的帐号');
						}	
						if(obj2 == 2)
						{
							alert('你选择的帐号有正常或已注销的，不能操作，只能解冻已冻结的帐号');
						}	
						if(obj2 == 3)
						{
							alert('你选择的帐号有冻结或已注销的，不能操作，只能注销正常的帐号');
						}	
						return false;
					}
				}
			}
		return true;	
	}
	function selectfStatus()
	{		
		for(i=0; i<form1.accounts.length; i++)
		{
			if(form1.accounts[i].checked)
			{
				form1.status[i].checked = true;				
			}
			else{
				form1.status[i].checked = false;
			}
		}
	}
</script> 

<body style="overflow-x:hidden">
<ww:property value="msg"/>
<table width="850" height="568" border="0" cellpadding="0"
	cellspacing="0" bordercolor="#D8EDFF">
	<!--DWLayoutTable-->
	<tr>
		<td height="8" colspan="4" valign="top"></td>
		<td width="834" valign="top"></td>
		<td width="5" valign="top"></td>
	</tr>
	<tr>
		<td height="5" colspan="3" align="right" valign="top"><img
			src="images/icon1.jpg" width="6" height="5" /></td>
		<td colspan="2" valign="top"><img src="images/icon2.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon3.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td width="7" height="523">&nbsp;</td>
		<td width="5" align="right" valign="top" background="images/icon5.jpg"><img
			src="images/icon5.jpg" width="5" height="5" /></td>
		<td colspan="2" valign="top" bgcolor="#D8EDFF">&nbsp;</td>
		<td valign="top">
		
		<table width="100%" border="0" cellpadding="0" cellspacing="0"
			bgcolor="#D8EDFF">
			<!--DWLayoutTable-->
			<tr>
				<td height="30" colspan="3" valign="middle"><span class="STYLE1">&nbsp;[财务管理]--&gt;[存款列表]</span></td>
				<td width="29">&nbsp;</td>
			</tr>
			<tr>
				<td height="59" colspan="3" align="center" valign="middle" class="STYLE6">存&nbsp;&nbsp; 款&nbsp;&nbsp; 列&nbsp;&nbsp; 表</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td width="90" height="345">&nbsp;</td>
				<td width="672" valign="top">
		<form name="searchform" method="post" action="financeDepositSearch.action" onSubmit="return check()">
			<table>
			<tr>
			  <td width="118" height="27">&nbsp;</td>
			  <td width="79" align="right" valign="middle"><span class="STYLE1">日期：</span></td>
			  <td width="120" valign="middle"><input name="actual_end_date" id="date" type="text" onDblClick="setday(this,actual_end_date)" dataType="Date" format="ymd" msg="请选择实际结束时间！" size="16" maxlength="20" style="width:100px; height:18px;"></td>
			  <td width="73" align="center" valign="middle"><input name="Submit" type="button" onClick="setday(this,actual_end_date)" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'" onMouseOut="this.className='btn1_mouseout'" value="选择日期"></td>
			  <td width="75" align="right" valign="middle"><span class="STYLE1">用户：</span></td>
			  <td width="122" valign="middle"><input name="username" type="text" size="16" maxlength="20" style="width:100px; height:18px;"></td>
			  <td width="128" align="center" valign="middle"><input name="Submit2" type="submit" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'" onMouseOut="this.className='btn1_mouseout'" value=" 搜 索 "></td>
			  <td width="73">&nbsp;</td>
			  <td>&nbsp;</td>
		  </tr>
		  </table>
		  </form>
				<FORM name="form1" method="post">
				<table width="100%" border=0 cellpadding=0 cellspacing=1
					bgcolor=5cb7fe>
					<!--DWLayoutTable-->
					<tr>
						<td width="107" height="25" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">账号 </span></td>
				    <td width="93" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">储户名</span></td>
				        <td width="113" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">存入日期</span></td>
				        <td width="115" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">存期</span></td>				        
				        <td width="118" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">存款金额</span></td>
					<td colspan="2" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">状态</span></td>
				    <td width="57" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">选择</span></td>							
					</tr>
					<ww:iterator value="depositList">
					<tr>
					  <td height="25" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">XH<ww:property value="account"/></span></td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1"><ww:property value="savername"/></span></td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1"><bk:dateconvert value="savedate" textformat="yyyy-MM-dd"/></span></td>
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1"><ww:if test="howlong == 'current'">活期</ww:if>
						<ww:elseif test="howlong == 'threeMonth'">三个月</ww:elseif>
						<ww:elseif test="howlong == 'sixMonth'">半年</ww:elseif>
						<ww:elseif test="howlong == 'oneYear'">一年</ww:elseif>
						<ww:elseif test="howlong == 'twoYear'">二年</ww:elseif>
						<ww:elseif test="howlong == 'threeYear'">三年</ww:elseif>
						<ww:elseif test="howlong == 'fiveYear'">五年</ww:elseif></span></td>					  
					  <td align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">￥<ww:property value="rmb"/></span></td>
					  <td colspan="2" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">
							<ww:if test="status == 1">正常</ww:if>
							<ww:elseif test="status == 2">
								<FONT color="#0000ff">已冻结</FONT>
							</ww:elseif>
							<ww:elseif test="status == 3">
								<FONT color="#ff0000">已注销</FONT>
							</ww:elseif>
							</span></td>
				  <td align="center" valign="middle"
							bgcolor="#D8EDFF"><INPUT type="checkbox" name="accounts" id="select" onclick="selectfStatus()" value="<ww:property value="account"/>">
</td>
				<td style="display:none" align="center" valign="middle"
							bgcolor="#D8EDFF"><INPUT type="checkbox" name="status" id="status" value="<ww:property value="status"/>">
</td>
				  </tr>
				  </ww:iterator>
					<tr>
					  <td height="25" colspan="7" align="center" valign="middle"
							bgcolor="#D8EDFF"><SPAN class="STYLE1"><ww:property value="pageBar"/></span></td>
					  <td colspan="2" align="center" valign="middle"
							bgcolor="#D8EDFF"><span class="STYLE1">全选</span>					    <ww:checkbox name="account" id="select" fieldValue="" onclick="this.checked?setall():setnull();" /></td>
				  </tr>
					<tr>
					  <td height="42" colspan="9" align="center" valign="middle" bgcolor="#D8EDFF"><input type="button" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'"
onMouseOut="this.className='btn1_mouseout'" name="Submit1" value=" 冻 结 " onClick="go1()">
				      &nbsp;&nbsp;  <input type="button" name="Submit2" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'"
onMouseOut="this.className='btn1_mouseout'" value=" 解 冻 " onClick="go2()">
				      &nbsp;&nbsp; 
				       <input type="button" name="Submit3" class="btn1_mouseout" onMouseOver="this.className='btn1_mouseover'"
onMouseOut="this.className='btn1_mouseout'" value=" 注 销 " onClick="go3()"></td>
				  </tr>
					
				</table>
				</form>
				</td>
				<td width="43">&nbsp;</td>
				<td>&nbsp;</td>
			</tr>




			<tr>
				<td height="72" colspan="4" valign="top">
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<!--DWLayoutTable-->
					<tr>
						<td width="834" height="113">&nbsp;</td>
					</tr>
				</table>
				</td>
			</tr>

</table>
		</td>
		<td valign="top" background="images/icon6.jpg"><img
			src="images/icon6.jpg" width="5" height="100%" /></td>
	</tr>



	<tr>
		<td height="5"></td>
		<td valign="top"><img src="images/icon7.jpg" width="5" height="5" /></td>
		<td colspan="3" valign="top"><img src="images/icon8.jpg" width="100%"
			height="5" /></td>
		<td valign="top"><img src="images/icon9.jpg" width="5" height="5" /></td>
	</tr>
	<tr>
		<td height="2"></td>
		<td></td>
		<td width="1"></td>
		<td width="6"></td>
		<td></td>
		<td></td>
	</tr>
</table>
</body>
</html>
